package com.foodchain.consts;

/**
 * @Author: yuanZ
 * @Date: 2018/7/27 14:05
 * @Description: 选择常量
**/
public class Consts {

    /*Session 存取常量名称*/
    public static final class Session {
        private Session() {}

        public static final String LOGIN_USER = "project-login-user";

        /** 客户端注册图形验证码 */
        public static final String IMG_VALIDATE_CODE = "client-img-validate-code";

        /** 客户端注册短信验证码 */
        public static final String SMS_VALIDATE_CODE = "client-sms-validate-code";
    }

    public static final class Mapping {
        private Mapping() {}

        /** 处理返回数据类型 */
        public static final String PRODUCES_TEXT = "text/html;charset=UTF-8";

    }

    /* 系统配置参数 */
    public static final class SysSetting {
        private SysSetting() {}

        // 用户登录密码错误锁定次数
        public static final String LOGIN_ERROR_TIMES = "login_error_times";

        // 观察员身份结束时间
        public static final String OBSERVER_END_TIME = "observer_end_time";
    }

    /* 管理端操作类型 */
    public static final class EditType {
        private EditType() {}

        public static final String ADD = "ADD";

        public static final String EDIT = "EDIT";

        public static final String DELETE = "DELETE";

    }

    public static final class Redis {
        private Redis() {
        }

        /** 短缓存（5分钟） */
        public static final String SHORT_CACHE = "shortCache";

        /** 10分钟 缓存 */
        public static final String TEN_MIN_CACHE = "tenMinCache";

        /** 30分钟 缓存 */
        public static final String HALF_HOUR_CACHE = "halfHourCache";

        /** 配置项前缀 */
        public static final String KEY_NOTIFICATION_LAST_SEND_TIME = "notification_last_send_time_";
    }

    /* 云片 */
    public static final class YunPian {

        public static final String APIKEY = "apikey";

        public static final String MOBILE = "mobile";

        public static final String TEXT = "text";

        public static final String URI_SEND_SMS = "https://sms.yunpian.com/v2/sms/single_send.json";

        public static final int OK = 0;
    }

    /* 图片获取路径 */
    public static final class FileUrl {
        public static final String file_url = "http://cbm.ink:8089/pokercli";
    }
}
